package com.siss.tenancy.user;

import com.siss.tenancy.user.rocket.MyInputConfig;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.cloud.stream.messaging.Source;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;


/**
 * boot主类
 *
 * @author ygw
 * @create 2017-07-11 11:44
 */

@SpringBootApplication
@EnableCircuitBreaker
@EnableAsync
@EnableScheduling
@EnableFeignClients
@EnableDiscoveryClient
@EnableBinding({MyInputConfig.class })
@ServletComponentScan(basePackages = {"com.siss.tenancy.user.config"})
public class UserApplication implements CommandLineRunner {
	public static void main(String[] args) {
		new SpringApplicationBuilder(UserApplication.class).web(WebApplicationType.SERVLET).run(args);
	}

	@Override
	public void run(String... args) throws Exception {
		for (String argValue : args) {
			// 遍历参数列表中的值
			System.out.println("参数值为：" + argValue);
		}
	}
}
